<!-- 创意推广预测 -->
<template>
  <div class="mainTable">
    <BaseTable :query="query" :updateItems="updateItems" :optionList="optionList" :methodParam="methodParam" :Btn="Btn"
      menuName="logRecord" pageName="mainTable" />
  </div>
</template>
<script>
import dayjs from "dayjs"
import BaseTable from "../../table/cytgycTable.vue";
import { service } from "../../../services/backServices";
export default {
  name: "cytgyc",
  data() {
    return {
      //后端人员修改-S
      //查询参数
      query: [
        {
          prop: "promotionTime", type: "time", placeholder: "",
          // value: GlobalSetting.fakeTime ?? [dayjs(new Date()).add(-1, 'days').format("YYYY-MM-DD"), dayjs(new Date()).format("YYYY-MM-DD")],
          value: "2024-02-07",
          name: "投放时间"
        },
        { prop: "promotionChannel", type: "select", placeholder: "", value: "万相台", name: "渠道" },
        { prop: "sixtyNineCode", type: "input", placeholder: "请输入", value: "6921443501268", name: "69码" },
        { prop: "goodSeries", type: "select", placeholder: "请输入", value: "樱肌感", name: "商品系列" },
        { prop: "creativityKind", type: "select", placeholder: "请输入", value: "横图", name: "创意类型" },
        { prop: "actualPriceMin", type: "input", placeholder: "请输入", value: "5", name: "最低价格" },
        { prop: "actualPriceMax", type: "input", placeholder: "请输入", value: "100", name: "最高价格" },
        { prop: "costInput", type: "input", placeholder: "请输入", value: "1000", name: "投放金额" }
      ],


      tableItems: [
        // 万相台
        // { name: "数据生成时间", prop: "=", align: "left" },
        { name: "渠道", prop: "渠道", align: "left" },
        { name: "平台", prop: "平台", align: "left" },
        { name: "投放时间", prop: "投放时间", align: "left" },
        { name: "投流商品系列", prop: "投流商品系列", align: "left" },
        { name: "投流商品69码", prop: "投流商品69码", align: "left" },
        { name: "投流商品价格", prop: "投流商品价格" },
        { name: "投放创意类型", prop: "投放创意类型", align: "left" },
        { name: "预测点击率", prop: "预测点击率" },
        { name: "预测转化率", prop: "预测转化率" },
        { name: "预测ROI", prop: "预测ROI" },
        { name: "投放金额", prop: "投放金额" },
        { name: "预测销售额", prop: "预测销售额" }
      ],

      //增删查改的对象属性
      updateItems: [//edit是回复
        { name: "文件名称", prop: "fileName", type: "input", disabled: true },
        { name: "上传类型", prop: "uploadType", type: "select" },
        { name: "备注", prop: "remark", type: "textarea" },
        { name: "上传文件", prop: "fileAdd", type: "upload" },
      ],
      //增删查改的对象属性的下拉select或者级联cascader
      //增删查改方法参数
      methodParam: "predictPromotionCreativity",

      //自定义btn功能
      Btn: {
        search: true, //查询按钮
        add: false, //添加按钮
        edit: false, //回复按钮
        detail: false, //详情按钮
        delete: false, //删除按钮
        deletes: false, //批量删除按钮
        export: true, //导出按钮
        templateDownload: false, //模板下载按钮
        upload: false, //上传按钮
      },
      optionList: {
        unit: [
          { label: "日", value: "日" },
          { label: "周", value: "周" },
          { label: "月", value: "月" },
          { label: "年", value: "年" },
        ],
        promotionChannel: [
          { label: "万相台", value: "万相台" },
          { label: "品销宝", value: "品销宝" },
        ],
        goodSeries: [
          { label: "樱肌感", value: "樱肌感" },
        ]
      }
      //后端人员修改-E
    };
  },
  components: {
    BaseTable
  },
  methods: {
  },
  created() {
    service({
      url: "getAllProductSeriesName",
      method: 'post'
    }).then((res) => {
      if (res.data.code == 200) {
        debugger
        this.optionList.goodSeries = res.data.data.map(x => {
          return {
            value: x,
            label: x
          }
        })
      }
    })
  }
};
</script>
<style scoped lang="less">
.mainTable {
  background-color: #f1f2f9;
}
</style>
  